package entity

import (
	"shqsoft.cn/pasnj/base"

	"github.com/jinzhu/gorm"
)

//经济资本
type IndiLoanJydw struct {
	ID   int    `gorm:"AUTO_INCREMENT;primary_key;column:ID"`
	JJH  string `gorm:"column:JJH"`  //借据号
	JYDW string `gorm:"column:JYDW"` //经营单位
}

//TableName 经济资本
func (IndiLoanJydw) TableName() string {
	return "T_INDI_LOAN_GXJYJG"
}

//导入后执行分户处理
func LoanJydwAfterImport(tx *gorm.DB, params map[string]string) (err error) {
	tx.Exec("EXEC UP_INDI_LOAN_GXJYJG_DTIP")
	return nil
}

func IndiLoanJydwEF() base.EntityFunc {
	return func() interface{} {
		entity := IndiLoanJydw{}
		return &entity
	}
}
func IndiLoanJydwESF() base.EntitiesFunc {
	return func() interface{} {
		var entities []IndiLoanJydw
		return &entities
	}
}

func init() {
	base.DaoPoolObj.Put("IndiLoanJydw", base.NewDefaultDao(IndiLoanJydwEF(), IndiLoanJydwESF(), nil))
	base.SetAfterCallBack("IndiLoanJydw", LoanJydwAfterImport)
}
